RWTH - Mindstorms NXT Toolbox

SetPower

Sets the power of the current active motor

Contents

Syntax

SetPower(power)

Description

SetPower(power) sets the power value of the current active motor which can be controlled by SendMotorSettings. The value power has to be an Integer value within the interval -100...100. It specifies the percentage of the maximal available power. Negative values indicates a reverse rotation direction. The power setting takes only affect with the next SendMotorSettings command.

Example

   SetMotor(MOTOR_B);
   	SetPower(-55);
   	SetAngleLimit(1200);
   SendMotorSettings();

See also

SendMotorSettings, SetMotor

Signature